package com.example.library_base.base

abstract class BaseEventHandler {

    companion object{
        private const val DELAY_TIME:Int = 1000
    }

    private var lastClickTime: Long = 0

    //防止1秒内的重复点击
    fun isFastClick(): Boolean{
        var flag = false
        val time = System.currentTimeMillis()
        val timeD = time - lastClickTime
        if (timeD > DELAY_TIME){
            flag = true
        }
        lastClickTime = time
        return flag
    }
}